package main.java.IO;

import java.io.Serializable;

/* 消息对象 */
//Serializable只起到一个标识性的作用
public class Massage implements Serializable {
    //消息id
    private Integer id;
    //标题  假如这个属性不希望系列化，可以使用transient关键字修饰
    private transient String title;
    //内容
    private String content;

    // 无参构造
    public Massage() {

    }
    // 有参构造
    public Massage(Integer id, String title, String content) {
        this.id = id;
        this.title = title;
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Massage{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
